package com.haizhi.vp.mapper;

import com.haizhi.vp.entity.BdInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * <p>
 * 保电开展情况 Mapper 接口
 * </p>
 *
 * @author fc
 * @since 2022-10-15
 */
@Mapper
public interface BdInfoMapper extends BaseMapper<BdInfo> {

    @Select("select sum(group_count) as group_count,SUM(person_count) as person_count,SUM(car_count) as car_count,SUM(rtz_count) as rtz_count,SUM(line_count) as line_count,\n" +
            "SUM(tower_count)as tower_count,SUM(km_count) as km_count,SUM(yh_count) as yh_count,SUM(yh_person) as yh_person,SUM(yh_group) as yh_group,\n" +
            "SUM(cy_group) as cy_group,SUM(cy_person) as cy_person,SUM(cy_car) as cy_car,SUM(cy_rtz) as  cy_rtz ,SUM(cy_line) as cy_line from bd_info where create_date =#{date}")
    Map<String,Double> getCount(String date);
}
